package com.kcwl.carrier.infrastructure.enums;

import lombok.Getter;

@Getter
public enum AuditIdentityEnum {

    SHIPPER(1, "物流公司"),
    CARRIER(2, "司机"),
    VEHICLE(3, "车辆"),
    VEHICLE_INSPACTION(4, "挂车"),
    VEHICLE_BLACKLIST(5, "车辆黑名单");

    public static final int SHIPPER_CODE = 1;
    public static final int CARRIER_CODE = 2;
    public static final int VEHICLE_CODE = 3;
    public static final int VEHICLE_INSPACTION_CODE = 4;
    public static final int VEHICLE_BLACKLIST_CODE = 5;

    private int code;
    private String value;

    AuditIdentityEnum(int code, String value) {
        this.code = code;
        this.value = value;
    }
    public static String getDesc(int code){

        for(AuditIdentityEnum aase : values()){
            if(aase.getCode() == code){
                return aase.getValue();
            }
        }
        return null;
    }
}
